package com.sluggard.security.manage.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sluggard.mp.model.entity.IdEntity;
import com.sluggard.mp.model.entity.StandardAuditEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * <p>
 * 操作日志
 * </p>
 *
 * @author lizheng
 * @since 2024-04-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_olog")
@Schema(name = "OlogEntity", description = "操作日志")
public class OlogEntity extends StandardAuditEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "操作员ID")
    @TableField("uid")
    private Long uid;

    @Schema(description = "模块")
    @TableField("module")
    private String module;

    @Schema(description = "模块名称")
    @TableField("module_name")
    private String moduleName;

    @Schema(description = "操作")
    @TableField("action")
    private String action;

    @Schema(description = "操作名称")
    @TableField("action_name")
    private String actionName;

    @Schema(description = "执行时间")
    @TableField("execute_time")
    private Long executeTime;

    @Schema(description = "请求参数")
    @TableField("request_params")
    private String requestParams;

    @Schema(description = "操作员")
    @TableField("operate_user")
    private String operateUser;

    @Schema(description = "操作结果{1:成功,2:失败}")
    @TableField("operate_result")
    private Integer operateResult;

    @Schema(description = "消息")
    @TableField("operate_message")
    private String operateMessage;

    @Schema(description = "客户端信息")
    @TableField("client_infos")
    private String clientInfos;
}
